package com.yoomiito.app.ui.anyview.shareview

import android.content.Context
import android.graphics.Bitmap
import cn.droidlover.xdroidmvp.net.ApiException
import cn.droidlover.xdroidmvp.net.ApiSubscriber
import cn.droidlover.xdroidmvp.net.XApi
import com.yoomiito.app.base.BaseActivity
import com.yoomiito.app.model.bean.GoodsDetail
import com.yoomiito.app.model.bean.ShareUrl
import com.yoomiito.app.net.YmApi
import com.yoomiito.app.showToast
import com.yoomiito.app.strFilter
import com.yoomiito.app.utils.ImageLoader

class ShareView(val context: Context,val goodsDetail: GoodsDetail) {
    private val privateGoodsShareView = SharePrivateGoodsView(context)
    var onPicMakeListener:(Bitmap)->Unit={}

    init {
        initView()
    }

    private fun initView() {
        privateGoodsShareView.initView(goodsDetail)
        privateGoodsShareView.onPicMakeListener={
            onPicMakeListener(it)
        }
    }

    fun setQRCodeUrl(url:String){
        privateGoodsShareView.setQRCodeUrl(url)
    }

}